﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;

namespace Prueba.ViewModel.Converters
{
    public class MultiBoolColorConverter : IMultiValueConverter
    {
        public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            object convertedValue = null;
            if (values != null && values.Length==2)
            {
                if ((bool)values[0] || (bool)values[1])
                {
                    convertedValue = System.Windows.Media.Brushes.Red;
                }
                else
                {
                    convertedValue = System.Windows.Media.Brushes.Transparent;
                }
            }
            return convertedValue;
        }

        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
